function App() {
  const [count, setCount] = useState(0);
  const [book, setBook] = useMyBook();
  return (
    <div>
      <p>{count}</p>
      <button onClick={setCount(count + 1)}>确定</button>
    </div>
  );
}

/**
 * 自定义Hooks
 * @returns 
 */
function useMyBook() {
  // 返回一个对象，包含book和setBook两个属性
  const [book, setBook] = useState("React Hook");
  return [book, setBook];
}
